feat: use all common names provided by ncbi for each assembly taxon (#1431)#1520
Open
hunterckx wants to merge 10 commits into
Open
feat: use all common names provided by ncbi for each assembly taxon (#1431)#1520hunterckx wants to merge 10 commits into
hunterckx wants to merge 10 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Expands catalog support for multiple NCBI-provided common names per assembly taxon (and aggregated to organisms), updating build pipelines, API contracts, and UI/table rendering to treat common names as a list rather than a single value.
Changes:
- Replace singular
commonNamewith list-valuedcommonNamesacross shared types, catalog build steps, and backend search/query surfaces. - Update UI configs and view model builders to render common names as N-tag lists and update workflow facet keys to use
assembly.commonNames. - Rebuild and update catalog artifacts (including GA2 taxonomy ID adjustments reflecting NCBI reclassification).
Reviewed changes
Copilot reviewed 31 out of 35 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/views/analyzeWorkflowsView/buildAssemblyWorkflows.scope.test.ts | Update workflow-scope test fixtures to use commonNames: []. |
| tests/analysisMethodCatalogs.utils.test.ts | Update catalog util test fixtures to use commonNames: []. |
| site-config/brc-analytics/local/index/workflow/categoryGroupConfig.ts | Point workflow category config at assembly.commonNames for filtering. |
| site-config/brc-analytics/local/index/organismEntityConfig.ts | Switch common names column to NTagCell and buildCommonNames. |
| site-config/brc-analytics/local/index/genomeEntityConfig.ts | Switch common names column to NTagCell and buildCommonNames. |
| site-config/brc-analytics/category.ts | Rename category key from commonName to commonNames. |
| packages/shared/apis/types.ts | Update AssemblyContract to optional list commonNames?: string[]. |
| catalog/py_package/catalog_build/build.py | Emit commonNames as JSON-serialized list in species TSV dataframe. |
| catalog/output/qc-report.data.md | Updated QC report output after rebuild. |
| catalog/output/data-build-meta.json | Updated build metadata timestamps and taxdump checksum. |
| catalog/ga2/source/organisms.yml | Update GA2 taxonomy ID to avoid dropping assemblies after NCBI reclassification. |
| catalog/ga2/output/qc-report.data.md | Updated GA2 QC report output after rebuild. |
| catalog/ga2/output/organisms.json | Updated GA2 organisms output after rebuild. |
| catalog/ga2/output/ncbi-taxa-tree.json | Updated GA2 taxa tree reflecting taxonomy/genus changes. |
| catalog/ga2/output/data-build-meta.json | Updated GA2 build metadata timestamps and taxdump checksum. |
| catalog/ga2/output/assemblies.json | Updated GA2 assemblies output after rebuild. |
| catalog/build/ts/utils.ts | Add parseJsonList helper for JSON list parsing. |
| catalog/build/ts/constants.ts | Rename core TSV column key to commonNames. |
| catalog/build/ts/build-organisms.ts | Aggregate organism-level commonNames from assembly-level lists. |
| catalog/build/ts/build-assemblies.ts | Parse row.commonNames as JSON list into assembly entities. |
| catalog/build/intermediate/outbreak-taxonomy-mapping.tsv | Updated intermediate mapping output ordering/content after rebuild. |
| backend/tests/test_catalog_data.py | Update backend tests to validate searching across commonNames. |
| backend/api/tests/test_catalog_query.py | Update organism schema/fixtures to use commonNames arrays and projection expectations. |
| backend/api/tests/test_catalog_data.py | Update API fixtures and add test ensuring secondary common name is searchable. |
| backend/api/app/services/tools/catalog_query.py | Treat commonNames as list field in query allowlists/projections. |
| backend/api/app/services/tools/catalog_data.py | Update search/exact-match/summarization to use commonNames list semantics. |
| backend/api/app/services/catalog_data.py | Update condensed organism records/search field list to commonNames. |
| app/views/WorkflowsView/utils.ts | Map workflow assembly commonNames into facet buckets with defaults. |
| app/views/WorkflowsView/types.ts | Update workflow assembly type to commonNames: string[]. |
| app/viewModelBuilders/catalog/brc-analytics-catalog/common/viewModelBuilders.tsx | Replace buildCommonName with buildCommonNames returning NTagCell props. |
| app/apis/catalog/brc-analytics-catalog/common/entities.ts | Update BRC catalog entity types to require commonNames: string[]. |
Comments suppressed due to low confidence (1)
backend/api/app/services/catalog_data.py:123
search_organismsnow includescommonNamesin a genericstr(...).lower()search. SincecommonNamesis a list, this relies on Python's list stringification (e.g. "['yeast', 'brewer's yeast']"), which is brittle and can introduce surprising matches; it also differs from the dedicated implementation inbackend/api/app/services/tools/catalog_data.pythat checks each name individually.
for org in self.organisms:
if any(
q in str(org.get(field, "")).lower()
for field in (
"taxonomicLevelSpecies",
"taxonomicLevelGenus",
"commonNames",
"ncbiTaxonomyId",
"taxonomicGroup",
"taxonomicLevelStrain",
"taxonomicLevelIsolate",
)
):
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates singular common name fields to instead hold multiple common names, derived from the name lists provided by NCBI
Notes:
Related Issue
Closes #1431